<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/vue.js"></script>
    <style>
        .wrap{
            width: 500px;
            height: 200px;
            background: red;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="wrap" @click="divClick">
            <button @click.stop="butClick">点击</button>
        </div>
    </div>
    <script>
        //阻止冒泡
        const vm = new Vue({
            el:"#app",
            data:{
               count:0
            },
            methods:{
                butClick(eve){
                    // eve.stopPropagation()
                    console.log("按钮点击了");
                },
                divClick(){
                    console.log("div点击了");
                }
            }
        })

    </script>
</body>
</html>